﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MeetingRoomEdit.aspx.cs" Inherits="Web.MeetingRoomEdit" %>

<!doctype html>
<html lang="en">
<head>
<title>会议室申请</title>
    <base target="_self" />
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <link href="yaml/core/base.min.css" rel="stylesheet" />
    <link href="yaml/forms/gray-theme.css" rel="stylesheet" />
    <link href="yaml/screen/typography.css" rel="stylesheet" />
    <!--[if lte IE 7]>
      <link rel="stylesheet" href="yaml/core/iehacks.min.css" type="text/css"/>
      <![endif]-->
    <!--[if lt IE 9]>
      <script src="yaml/lib/html5shiv/html5shiv.js"></script>
      <![endif]-->

    <script src="Content/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Scripts/easy_validator.pack.js" type="text/javascript"></script>
    <link href="Styles/validate.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        $(function () {
            $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
            $("textarea").each(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
            $("textarea").keydown(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
            $("#btnSave").click(function () { return formValidate(); });
        });
        function formValidate() {
            var isSubmit = true;
            $("form").find("[reg],[url]:not([reg])").each(function () {
                if (!validate($(this), this.tagName)) {
                    isSubmit = false;
                }
            });
            if (!isSubmit) {
                alert("请确认'红字或红框'处的输入正确!");
                return false;
            }
            var dateStart = $("#PreStartTime").val();
            var dateEnd = $("#PreEndTime").val();
            if (dateStart > dateEnd) {
                alert("结束时间不能比开始时间小");
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server" class="ym-form ym-full">
    <table class="bordertable">
        <tr><td>表单编号</td><td><%=reqMeetingRoom.FormNo%></td><td>申请时间</td><td><%=reqMeetingRoom.ReqDate.ToString("yyyy-MM-dd HH:mm:ss")%></td></tr>
        <tr><td>申请人</td><td><%=empName%></td><td></td><td></td></tr>
        <tr>
            <td>开始时间</td>
            <td><input id="PreStartTime" runat="server" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate: '%y-%M-%d', maxDate: '%y-%M-{%d+6}'});" title="格式:yyyy-MM-dd HH:mm:ss!" reg="."/></td>
            <td>结束时间</td>
            <td><input id="PreEndTime" runat="server" class="Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate: '#F{$dp.$D(\'PreStartTime\',{m:30});}', maxDate: '#F{$dp.$D(\'PreStartTime\',{H:4});}'});" title="格式:yyyy-MM-dd HH:mm:ss!" reg="."/></td>
        </tr>
        <tr>
            <td>会议室</td>
            <td><select id="RoomName" runat="server" title="请选择会议室" reg=".">
            <option value=""></option>
            <option value="1#会议室(11楼大)">1#会议室(11楼大)</option>
            <option value="2#会议室(11楼小)">2#会议室(11楼小)</option>
            <option value="3#会议室(3楼大)">3#会议室(3楼大)</option>
            <option value="4#会议室(3楼小)">4#会议室(3楼小)</option></select></td>
            <td>投影仪</td>
            <td><select id="IsNeedProjector" runat="server"><option value="0">不需要</option><option value="1">需要</option></select></td>
        </tr>
        <tr>
            <td>备注</td>
            <td colspan="3"><input id="Cause" runat="server"/></td>
        </tr>
    </table>
    <div style="text-align:left;margin:6px;line-height:24px;letter-spacing:1px;">
        1.会议室申请已不走签核,在保存时候会 比对 已保存的表单,对时间冲突会给出提示;<br/>
        2.原则上先申请先得,后者确实有困难请双方协商解决;<br/>
        3.为避免会议室乱用,只能申请一周(7天)内的会议室.
    </div>
<div style="text-align:right;margin-right:24px;margin-top:6px;">
    <asp:button runat="server" text="保存" CssClass="btn" id="btnSave" onclick="btnSave_Click"/>
    <input type=button value="关闭" class="btn" onclick="window.close();" />
</div>
    </form>
</body>
</html>